const JS_URL_SPLIT = '/js/'
export function getJsUrl() {
  let elem: HTMLScriptElement = document.currentScript as HTMLScriptElement
  if (!elem) {
    elem = document.scripts[0]
  }
  return new URL(elem.src.split(JS_URL_SPLIT)[0]).pathname
}